<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
       .hr{
           width: 300px;
           background-color: red
       }
       .hr.half-px{
           height: 1px;
             /* 第一种方法使用css3的缩放,但是chrom会变虚，需要加上transform-origin:50% 100% */
           transform: scaleY(0.5);
           transform-origin:50% 100%;
           -moz-transform: scaleY(0.5);
           -moz-transform-origin:50% 100%;

       }

       .hr.one-px{
           height: 1px;
       }
    
    </style>
</head>
<body>
    <p>0.5px</p>
    <div class="hr half-px"></div>
    <p>1px</p>
    <div class="hr one-px"></div>
</body>
</html>